const express = require('express')
const help = express.Router()
const pool = require('../pool')

//帮助中心选项接口
help.get('/help', (req,res,next) => {
	  //获取传过来的options_id
	  let options_id=req.query.options_id
     
     let sql=`select * from hd_help_center where options_id=?;`
	 pool.query(sql,[options_id],(err, result)=>{
		 if(err) next(err);
		 res.send({ code: 200, result:result})
	 })
});
//帮助中心选项二级接口
help.get('/help_two', (req,res,next) => {
	  //获取传过来的options_id
	  let hid=req.query.hid
     
     let sql=`select * from hd_hc_secondary where secondary_id=?;`;
	 pool.query(sql,[hid],(err, result)=>{
		 if(err) next(err);
		 res.send({ code: 200, result:result})
	 })
});




module.exports = help